package com.game.thrones.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Test {

	public static void main(String[] args) {
//		Integer i=1;
//		NumberFormat nf = new DecimalFormat("000000");
//		 String serial=nf.format(i);
//		 System.out.println(serial);
		//System.out.println(System.currentTimeMillis());
		Date date=new Date();
		SimpleDateFormat sdf2=new SimpleDateFormat("EEEE");
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
      //取当前是星期几
        int weekOfDay= cal.get(Calendar.DAY_OF_WEEK) - 1;
        if (weekOfDay < 0){
        	weekOfDay = 0;
        }
        //取当前是第几周
        int weekOfMonth = cal.get(Calendar.WEEK_OF_MONTH);
		System.out.println(sdf2.format(date));
	}
}
